package com.chinawayltd.ews.sample.job;

import org.quartz.JobExecutionContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.chinawayltd.ews.sample.service.SynchroDriverService;
import com.chinawayltd.ews.sample.taskCenter.TaskJob;

/**
 * @program: greeProject-timingTaskCenter
 * @description 司机数据同步任务
 * @author: chenxin
 * @create: 2018年4月25日 下午2:47:18
 */
@Component
public class SynchroDriverWorkJob implements TaskJob {

    private static Logger logger = LoggerFactory.getLogger(SynchroDriverWorkJob.class);

    @Autowired
    private SynchroDriverService synchroDriverService;
    
    @Override
    public void doJob(JobExecutionContext context) {
        try {
        	synchroDriverService.synchroDriverWorkData();
        } catch (Exception e) {
            logger.error("司机上班信息同步定时器执行时发生错误！", e);
        }
    }

}
